﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Money Tracker</title>
    <script src="../Scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="login.js" type="text/javascript"></script>
    <script src="md5.js" type="text/javascript"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes" />
    <script src="../MetroUI/javascript/input-control.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../MetroUI/css/modern.css" />
    
</head>
<body class="bg-color-blue fg-color-white">
     
        <div style=" border-bottom:1px solid white; margin-left:10px; margin-right:10px;">
            <h2 class="fg-color-white">Money Tracker</h2>
        </div>   
        <button id='idBtnFunc' class="bg-color-red  fg-color-white" style="position:relative; float:right;"> Sign Up <i class="icon-bookmark-2"></i></button>
        <img id="idLoginWaiting" src="../MetroUI/images/preloader-w8-cycle-black.gif" /> 
        <div id='idLoginContent' style="width:90%; margin-left:auto; margin-right:auto; margin-top:45px;">
        <!--a href="mailto:jsjjms@gmail.com"><span class="name icon-mail">Customer Support</span></a-->
            <h3 class="icon-user fg-color-white"> Email</h3>
            <div class="input-control text ">
                <input id='idUserId' type="email" class="fg-color-black" placeholder='Enter your email' style="color:black;" />
            </div>

            <h3 class="icon-locked fg-color-white"> Password</h3>
            <div class="input-control text ">
                <input id="idPassword" type="password" class="fg-color-black" placeholder='Enter your password' style="color:black;" />
             </div>

            <div style="display:none; border:1px dotted red; margin-bottom:2px;" id="idError" class="fg-color-red icon-eye" ></div>
            <div style="border-bottom:1px dotted white; text-align:center;">
                <label class="input-control checkbox">
                    <input type="checkbox" checked  id="idRememberPassword"/>
                    <span class="helper" style="font-size:smaller; ">Remember Password?</span> 
                </label>
            
                <button id='idLogin2System' class=" bg-color-darken  fg-color-white"> Login <i class="icon-unlocked"></i></button>
            </div>

            <div style="text-align:center;cursor:pointer;" class="fg-color-dark; "><h4 id="idForgotPassword"> Forgot Password? </h4></div>
        </div>
        <div id="idFunc" style="display:none;width:90%; margin-left:auto; margin-right:auto; margin-top:45px;" ></div>
        <div id="tailer" style="border-top:1px solid white; margin-top:20px;">
            <div style="text-align:center;"> <h4 class="fg-color-white"> &copy;2013 Liang Fan</h4> </div>
        </div>
</body>
<script type="text/javascript">
    function LoadResetPassword(mode, code)
    {
        if ('resetpassword' == mode)
        {
            var v = decodeURI(code).split('|');
            var email = v[0];
            var c = v[1];
            if (hex_md5(email) == c)
            {
                CurrentStep = "resetPassword";
                $('#idLoginContent').hide();
                $('#idFunc').load('resetPassword.htm', function ()
                {
                    $('#idLoginWaiting').hide();
                });
                $('#idFunc').show();
                $('#idBtnFunc').html('Sign In');
            }
            else
            {
                alert('Error Email Address');
            }
        }
    }

    var url = window.location;

    if (url.toString().indexOf("?") != -1)
    {
        var param = url.toString().split('?')[1].split('&');
        var mode = param[0].split('=')[1];
        var code = param[1].split("=")[1];
        LoadResetPassword(mode, code);
    }
</script>
</html>
